notebook: Make reordering safe for tab disappearance
authorMatthias Clasen <mclasen@redhat.com>
Fri, 30 Jan 2015 04:48:06 +0000 (23:48 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 30 Jan 2015 14:39:26 +0000 (09:39 -0500)
If the dragged tab is removed during reordering, we need to
call gtk_notebook_stop_reorder(), to clean up and bring the
remaining tabs back in order.

gtk/gtknotebook.c

index 61ca58022c21be163a581710063c2f2d2816eab0..2bf9e74a65817d9ecd2e73dd37c93cfb9549e3af 100644 (file)
@@ -5047,6 +5047,8 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
       priv->cur_page = NULL;
       if (next_list && !destroying)
         gtk_notebook_switch_page (notebook, GTK_NOTEBOOK_PAGE (next_list));
+      if (priv->operation == DRAG_OPERATION_REORDER)
+        gtk_notebook_stop_reorder (notebook);
     }
 
   if (priv->detached_tab == list->data)